package com.cn.yds.bdy.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

@ApiModel(value = "user")
@NoArgsConstructor
@AllArgsConstructor
@Data
public class UserVo implements Serializable {

    /**
     * user account number
     */
    @ApiModelProperty(value = "用户名",name = "account",required = true)
    @NotEmpty(message = "account not allow empty!")
    @Size(min = 1,max = 50)
    private String account;

    /**
     * user password str
     */
    @ApiModelProperty(value = "密码",name = "password",required = true)
    @NotEmpty(message = "password not allow empty!")
    @Size(min = 1,max = 16)
    private String password;

    /**
     * user role ; 1 : student ; 0 : teacher;
     */
    @ApiModelProperty(value = "角色",name = "role",required = true)
    @NotNull(message = "please choose your role !")
    private Integer role;
}
